[%WRAPPER Static/Interface/Page.htm
  title = "${category.TITLE} : ${resource.TITLE}"%]
      <table border="0" cellpadding="5" cellspacing="2" width="100%">
        <tr>
          <td><font class="location"><a href="[%system.SCRIPT_URL%]">Index</a> /
          [%FOREACH rootcategory = category.root%]
            <a href="[%system.SCRIPT_URL%]?action=Category&CID=[%rootcategory.ID%]">[%rootcategory.TITLE%]</a> /
          [%END%]
            <a href="[%system.SCRIPT_URL%]?action=Category&CID=[%category.ID%]">[%category.TITLE%]</a> /</font></td>
        </tr>
      </table>
      <table border="0" cellpadding="1" cellspacing="1" width="100%" class="main-border">
        [%form.StartForm()%]
        <tr class="main-background">
          <td>
            <table border="0" cellpadding="1" cellspacing="0" width="100%">
              <tr>
                <td>
                  <table border="0" cellspacing="1" cellpadding="3" width="100%" class="row-border">
                    <tr class="header">
                      <td>
                        <table border="0" cellspacing="0" cellpadding="1" width="100%">
                          <tr>
                            <td width="2" nowrap></td>
                            <td width="100%"><font class="header">[%resource.TITLE%]</font></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td>
                  <table border="0" cellspacing="1" cellpadding="3" width="100%" class="row-border">
                    <tr class="body">
                      <td>
                        <table border="0" cellspacing="1" cellpadding="0" width="100%" class="table-border">
                          <tr>
                            <td>
                              <table border="0" cellspacing="1" cellpadding="6" width="100%" class="table">
                                <tr class="table-header">
                                  <td align="left" width="100%" colspan="3"><font class="table-header">Resource Information</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Title</font></td>
                                  <td width="100%"><font class="form-field">[%resource.TITLE%]</font></td>
                                [%IF resource.IMAGE && general.RESOURCE_IMAGES%]
                                  <td width="1" nowrap rowspan="7"><img border="0" src="[%resource.IMAGE%]"></td>
                                [%END%]
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">URL</font></td>
                                  <td width="100%"><font class="form-field"><a href="[%system.SCRIPT_URL%]?action=Jump&RID=[%resource.ID%]">[%resource.URL%]</a></font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Category</font></td>
                                  <td width="100%"><font class="form-field">[%category.FULL_TITLE%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Description</font></td>
                                  <td width="100%"><font class="form-field">[%resource.DESCRIPTION%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Contact</font></td>
                                  <td width="100%"><font class="form-field">[%IF resource.SHOW_EMAIL%]<a href="mailto:[%resource.CONTACT_EMAIL%]">[%resource.CONTACT_NAME%][%ELSE%][%resource.CONTACT_NAME%][%END%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Added</font></td>
                                  <td width="100%"><font class="form-field">[%resource.CREATE_DATE%] at [%resource.CREATE_TIME%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Last Updated</font></td>
                                  <td width="100%"><font class="form-field">[%resource.UPDATE_DATE%] at [%resource.UPDATE_TIME%]</font></td>
                                </tr>
                            [%IF general.RESOURCE_EXTRA.size >= 1%]
                                <tr class="table-header">
                                  <td colspan="2"><font class="table-header">Extra</font></td>
                                </tr>
                              [%FOREACH field = general.RESOURCE_EXTRA%]
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">[%field.DESCRIPTION%]</font></td>
                                [%IF field.CUSTOM_DISPLAY%]
                                  <td width="100%"><font class="form-field">[%field.CUSTOM_DISPLAY | eval%]</td>
                                [%ELSE%]
                                  <td width="100%"><font class="form-field">[%resource.extra.${field.ID}%]</td>
                                [%END%]
                                </tr>
                              [%END%]
                            [%END%]
                                <tr class="table-header">
                                  <td align="left" width="100%" colspan="3"><font class="table-header">Rating</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Current Rating</font></td>
                                  <td width="100%" colspan="2"><font class="form-field">[%resource.RATING%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Rate Resource</font></td>
                                  <td width="100%" colspan="2"><font class="form-field">
                                  [%IF rated%]
                                    You, or someone else using your IP address, has already rated this resource.
                                  [%ELSE%]
                                    [%form.SelectBox(name = "FORM_RATING", class = "", items = [
                                      { value = "",   label = "Select" },
                                      { value = "1",  label = "1 - Worst" },
                                      { value = "2",  label = "2" },
                                      { value = "3",  label = "3" },
                                      { value = "4",  label = "4" },
                                      { value = "5",  label = "5" },
                                      { value = "6",  label = "6" },
                                      { value = "7",  label = "7" },
                                      { value = "8",  label = "8" },
                                      { value = "9",  label = "9" },
                                      { value = "10", label = "10 - Best" }                                    
                                    ])%]
                                    [%form.Button(type = "submit", value = "Rate")%]
                                  [%END%]                                    
                                    </font></td>
                                </tr>
                                <tr class="table-header">
                                  <td align="left" width="100%" colspan="3"><font class="table-header">Reviews</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Number of Reviews</font></td>
                                  <td width="100%" colspan="2"><font class="form-field">[%reviews.size%]</font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Review Resource</font></td>
                                  <td width="100%" colspan="2"><font class="form-field">
                                  [%IF reviewed%]
                                    You, or someone else using your IP address, has already reviewed this resource.
                                  [%ELSE%]
                                    <a href="[%system.SCRIPT_URL%]?action=Review&RID=[%resource.ID%]">Review</a>
                                  [%END%]                                    
                                    </font></td>
                                </tr>
                                <tr class="table-row">
                                  <td width="200" valign="top" nowrap><font class="form-subject">Reviews</font></td>
                                  <td width="100%" colspan="2"><font class="form-field">
                                    <ul>
                                    [%FOREACH review = reviews%]
                                      <li>[%review.REVIEW%]<br>
                                        <small><b><i>posted by [%review.NAME%] on [%review.CREATE_DATE%] at [%review.CREATE_TIME%]</i></b></small></li>
                                    [%END%]
                                    </ul>
                                  [%IF review.size < 1%]
                                    There are currently no reviews to display.
                                  [%END%]
                                    </font></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td>
                  <table border="0" cellspacing="1" cellpadding="3" width="100%" class="row-border">
                    <tr class="bottombar">
                      <td><font class="bottombar"></font></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        [%form.Hidden(name = "RID", value = resource.ID)%]
        [%form.Hidden(name = "action", value = "DoRate")%]
        [%form.EndForm()%]
      </table>
[%END%]